// Addin.cpp : Implementation of CAddIn

#include "stdafx.h"
#include "Addin.h"
#include "ArtApp.h"

// CAddIn

STDMETHODIMP CAddIn::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IAddIn
	};
	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}

	return S_FALSE;
}

STDMETHODIMP CAddIn::SatelliteDLLPath(void)
{
	// TODO: Add your implementation code here

	return S_OK;
}

STDMETHODIMP CAddIn::get_Name(BSTR* pVal)
{
	// TODO: Add your implementation code here

	return S_OK;
}

STDMETHODIMP CAddIn::get_Description(BSTR* pVal)
{
	// TODO: Add your implementation code here

	return S_OK;
}

STDMETHODIMP CAddIn::get_Connected(VARIANT_BOOL* pVal)
{
	// TODO: Add your implementation code here

	return S_OK;
}

STDMETHODIMP CAddIn::get_ProgID(BSTR* pVal)
{
	// TODO: Add your implementation code here
	return S_OK;
}


HRESULT CAddIn::Run()
{
	HRESULT hr = m_pExtensibility.CoCreateInstance(m_ProgID);
	COM_ASSERT(hr);
	if (FAILED(hr))
		return hr;

	m_pExtensibility.p->AddRef();
	
	return hr;
}


